import { store } from "@/redux";
/**
 * @description 页面按钮权限 hooks
 * */
const useAuthPermission = (rescource: string) => {
	const permission = store.getState().auth.permissions;

	return permission.some((item: any) => item.resource === rescource);
};

export default useAuthPermission;
